<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib prefix="dwz" uri="http://www.lyjuan.cn/dwz/tags" %>


<form id="pagerForm" method="post" action="<dwz:url url="manage/manageList"/>">
	<input type="hidden" name="pageNum" value="<c:out value="${param.pageNum}" default="1"/>" />
	<input type="hidden" name="name" value="${param.name}" />
	<input type="hidden" name="status" value="${param.status}" />
</form>

<div class="pageHeader">
	<form onsubmit="return navTabSearch(this);" action="<dwz:url url="manage/manageList"/>" method="post">
	<div class="searchBar">
		<table class="searchContent">
			<tr>
				<td>
					账号：<input type="text" name="name" value="${param.name}" />
				</td>
				<td>
					状态：
					<select name="status">
						<option value="">不限</option>
						<option <c:if test="${'0' == param.status}">selected="selected"</c:if> value="0">锁定</option>
						<option <c:if test="${'1' == param.status}">selected="selected"</c:if> value="1">正常</option>
					</select>
				</td>
            </tr>
            <tr>
				<td>
					<div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div>
				</td>
			</tr>
		</table>
	</div>
	</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li>
                <dwz:elt htmlName="a" url="to/manage/preAddManage" rel="manage_preAddManage" target="dialog" width="400">
                    <span>添加</span>
                </dwz:elt>
            </li>
		</ul>
	</div>
	<div layoutH="116">
	<table class="table" width="100%" layoutH="138">
		<thead>
			<tr>
				<th width="50px">编号</th>
                <th width="100px">操作</th>
				<th>账号</th>
                <th>说明</th>
				<th>状态</th>
				<th>创建时间</th>
			</tr>
		</thead>
		<tbody>
			<c:forEach items="${manages}" var="list">
				<tr target="sid" rel="${list.id}">
					<td>${list.id}</td>
                    <td>
                        <dwz:elt htmlName="a" url="manage/preUpdateManage" data="name=${list.name}" rel="manage_preUpdateManage"
                                 target="dialog" width="400">
                            修改/&nbsp;
                        </dwz:elt>
                        <dwz:elt htmlName="a" url="manage/preRelateRole" data="name=${list.name}" rel="manage_relateRole"
                                 target="dialog">
                            关联角色
                        </dwz:elt>
                    </td>
					<td>${list.name}</td>
                    <td>${list.info}</td>
					<td>
						<c:if test="${list.status == 0}">锁定</c:if>
						<c:if test="${list.status == 1}">正常</c:if>
					</td>
					<td><fmt:formatDate value="${list.createtime}" pattern="yyyy-MM-dd HH:mm:ss" /></td>
				</tr>
			</c:forEach>
			
		</tbody>
	</table>
	</div>
	
	<div class="panelBar">
		<div class="pages">
			<span>显示</span>
			<span>共&nbsp;${totalCount}&nbsp;条</span>
		</div>
		
		<div class="pagination" targetType="navTab" totalCount="${action.totalCount}" numPerPage="${action.numPerPage}" pageNumShown="10" currentPage="${action.pageNum}"></div>

	</div>
</div>
